3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
QuickDraw 3D RAVE provides routines that you can use to create and dispose of color lookup tables.
You can use the QAColorTableNew function to create a new color lookup table.
TQAError QAColorTableNew (
const TQAEngine *engine,
TQAColorTableType tableType,
void *pixelData,
long transparentIndexFlag,
TQAColorTable **newTable);
The QAColorTableNew function returns, through the newTable parameter, a new color lookup table associated with the drawing engine specified by the engine parameter. The table entries for the new color lookup table are copied from the block of data pointed to by the pixelData parameter; if QAColorTableNew completes successfully, you can dispose of that block of memory. The data in that block of memory is interpreted according to the format specified by the tableType parameter. For example, if tableType is kQAColorTable_CL8_RGB32 , then pixelData should point to a block of data that is at least 1024 bytes long and in which each 32-bit quantity is an RGB color value.
Currently, QuickDraw 3D RAVE supports only 32-bit RGB color lookup table entries. The specified drawing engine might reduce the size of individual color lookup table entries to fit into its on-board memory.
Not all drawing engines support color lookup tables, and QuickDraw 3D RAVE does not provide color lookup table emulation for engines that do not support them.
You can use the QAColorTableDelete function to delete a color lookup table.
void QAColorTableDelete (
const TQAEngine *engine,
TQAColorTable *colorTable);
The QAColorTableDelete function deletes the color lookup table specified by the colorTable parameter. Any memory and other resources associated with that color lookup table are released.
Use the QAColorTableNew function [link] to create a color lookup table.
Previous | QD3D Book | Overview | Chapter Contents | Next |